﻿@model MSAcademic.v2.Web.Areas.Admin.Models.User.ChangeProfilePictureViewModel
@{
    ViewBag.Title = "Promijena profilne fotografije";
}

<h2>Promijena profilne fotografije</h2>

<div class="editProfilePicture clearfix">
    <div class="picture"><img src="@Model.SignedInUser.ProfilePictureUrl"/></div>

    <div class="forms">

        @if (!String.IsNullOrWhiteSpace(Model.ErrorMessage)) { 
            <div class="field-validation-error">@Model.ErrorMessage</div>
        }

        <h3>Koristi file upload</h3>
        @using (Html.BeginForm("Upload", "Picture", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            <input type="file" name="picture" />
    
            <div class="actions-wrapper clearfix">
                <a class="positive submit">Spremi promjene <i class="icon-ok"></i></a> 
            </div>
        }

        <h3>Koristi URL upload</h3>
        <p class="note">Napomena: slike s nekih URL-ova nije moguće preuzeti i koristiti kao profilnu fotografiju.</p>
        @using (Html.BeginForm("DownloadAndSave", "Picture", FormMethod.Post))
        {
            @Html.TextBoxFor(m => m.Url, new { @placeholder = "Unesi URL slike koju želiš koristiti kao profilnu fotografiju " })
    
            <div class="actions-wrapper clearfix">
                <a class="positive submit">Spremi promjene <i class="icon-ok"></i></a> 
            </div>
        }
        </div>

</div>